<?php

/* @var $this yii\web\View */

use yii\helpers\Html;
use yii\widgets\ListView;
use app\models\Notice;
use yii\data\ActiveDataProvider;

$dataProvider = new ActiveDataProvider([
    'query' => Notice::find()->orderBy(['dt'=>SORT_DESC])->with('author0'),
    'pagination' => [
        'pageSize' => 20,
    ],
]);
$this->title = '向会员发布系统公告';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="page-title">
  <div>
    <h1><i class="fa fa-bullhorn"></i> 系统公告</h1>
    <ul class="breadcrumb side">
      <li><i class="fa fa-home fa-lg"></i></li>
      <li class="active"><a href="#">系统公告</a></li>
    </ul>
  </div>
</div>

<div class='card'>
<?php
echo ListView::widget([
    'dataProvider' => $dataProvider,
    'itemView' => '_noticeitem',
    'viewParams' => [
        //'fullView' => true,
        //'context' => 'main-page',
        // ...
    ],
]);

 ?>
 </div>
